<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/m_master">

<div layout:fragment="content">
    <link href="/m/css/center/pay.css" rel="stylesheet"/>
    <div class="page-group">
        <div class="page page_pay">
            <div th:replace="layout/m_layout::title('订单支付')"></div>
            <div class="page-content">
                <div class="head">
                    <h3 class="money">¥ [[${setmeal.payAmount}]]</h3>
                    <p class="title" th:text="${setmeal.itemName}">
                    </p>
                    <p class="order_id" th:text="${setmeal.orderId}">
                    </p>
                </div>

                <div class="">

                    <div class="ways">

                        <div class="item">
                            <label>
                                <input class="" name="way" type="radio" value="wxwap"/>
                                <span>
                                <em></em>
                            <img class="icon" src="/m/img/payway/wechat.png"/>
                            微信H5支付
                            </span>
                            </label>
                        </div>
<!--                                <div class="item">-->
<!--                                    <label>-->
<!--                                        <input class="" name="way" type="radio" value="alipay" />-->
<!--                                        <span>-->
<!--                                        <em></em>-->

<!--                                    <img class="icon" src="/m/img/payway/alipay.png" />-->
<!--                                    支付宝-->

<!--                                    </span>-->
<!--                                    </label>-->
<!--                                </div>-->
                    </div>
                    <div style="padding: .5rem .5rem; margin-top:2rem;">
                        <button class="btn btn-success btn-block submit">
                            立即支付
                        </button>
                    </div>

                    <!-- <div style="padding: .5rem .5rem;">
                        <button class="btn btn-invalid btn-block" onclick="window.history.go(-1)" type="submit">
                            取消支付
                        </button>
                    </div>-->

                    <p style=" padding:2rem 0; line-height:1.3; font-size:12px;  text-align:center;">
                        点击查看
                        <a class="_color" href="/common/about/paymentagreement">
                            《
                            <u>
                                用户支付协议
                            </u>
                            》
                        </a>
                    </p>

                </div>

            </div>
        </div>
    </div>
    <script>
        $(".btn-success").click(function () {
            var way = $("input[name='way']:checked").val();
            if (way==undefined){
                way="wxwap";
            }
            if (way=="wxwap"){
                window.location="/pay/weixin/m/[[${setmeal.orderId}]]";
            }
        });
    </script>
    <div th:replace="layout/m_layout::systemJs"></div>
</div>
</html>
